{
    // 限制的不一定非得是数据类型，也可以是值,和const 的区别是const定义的变量不可以再次赋值，而它可以
    let hd1:"hd";
    // hd1 = "houdunren";
    hd1 = "hd"
    console.log(hd1);
    const hdr = "hdr";

    // as const根据具体的值来转化类型
    let aa:string = "abc";
    let bb = "abc" as const;
    let cc = 99;
    let dd = 99 as const;
    let ee = true;
    let ff = true as const;

    // 数组经过as const之后会变成元组，而且是只读
    const arr1 = [aa,cc,ee] as const;
    // dd是值类型99，所以元组arr2的第二个元素就是99,后面的元素也是值
    const arr2 = [aa,dd,88,"bbb",false] as const;

    // 里面的name是字符串类型
    let obj1 = {name:"houdunren"};
    // 里面的name是值类型，且值为后盾人，并且只读
    let obj2 = {name:"houdunren"} as const;
    // 因为aa为字符串类型,所以里面的name也为字符串类型，并且只读
    let obj3 = {name:aa} as const;
    // 因为bb为值类型且值为abc,所以里面的name也为值类型且值为abc，并且只读
    let obj4 = {name:bb} as const;
}